//
//  ProductDetailViewController.m
//  solarMan
//
//  Created by 范桂盛 on 2016/12/15.
//  Copyright © 2016年 solar. All rights reserved.
//

#import "ProductDetailViewController.h"
#import <Masonry.h>

@interface ProductDetailViewController ()
@property (nonatomic, strong) UILabel *sn;
@property (nonatomic, strong) UILabel *model;
@property (nonatomic, strong) UILabel *sw;
@property (nonatomic, strong) UILabel *comsw;
@property (nonatomic, strong) UILabel *date;
@end

@implementation ProductDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    UILabel *label = [UILabel new];
    [label setTextColor:[UIColor blueColor]];
    [label setFont:[UIFont systemFontOfSize:15]];
    self.sn = label;
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.view.mas_left).offset(10);
        make.right.mas_equalTo(self.view.mas_right).offset(-10);
        make.height.mas_equalTo(25);
        make.top.mas_equalTo(self.view.mas_top).offset(74);
    }];
    
    label = [UILabel new];
    [label setTextColor:[UIColor blueColor]];
    [label setFont:[UIFont systemFontOfSize:15]];
    self.model = label;
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.view.mas_left).offset(10);
        make.right.mas_equalTo(self.view.mas_right).offset(-10);
        make.height.mas_equalTo(25);
        make.top.mas_equalTo(self.sn.mas_bottom).offset(10);
    }];
    
    label = [UILabel new];
    [label setTextColor:[UIColor blueColor]];
    [label setFont:[UIFont systemFontOfSize:15]];
    self.sw = label;
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.view.mas_left).offset(10);
        make.right.mas_equalTo(self.view.mas_right).offset(-10);
        make.height.mas_equalTo(25);
        make.top.mas_equalTo(self.model.mas_bottom).offset(10);
    }];
    
    label = [UILabel new];
    [label setTextColor:[UIColor blueColor]];
    [label setFont:[UIFont systemFontOfSize:15]];
    self.comsw = label;
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.view.mas_left).offset(10);
        make.right.mas_equalTo(self.view.mas_right).offset(-10);
        make.height.mas_equalTo(25);
        make.top.mas_equalTo(self.sw.mas_bottom).offset(10);
    }];
    
    label = [UILabel new];
    [label setTextColor:[UIColor blueColor]];
    [label setFont:[UIFont systemFontOfSize:15]];
    self.date = label;
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.view.mas_left).offset(10);
        make.right.mas_equalTo(self.view.mas_right).offset(-10);
        make.height.mas_equalTo(25);
        make.top.mas_equalTo(self.comsw.mas_bottom).offset(10);
    }];
    
    self.sn.text = [NSString stringWithFormat:@"SN: %@", @"Z23LAB77777777"];
    self.model.text = [NSString stringWithFormat:@"MODEL: %@", @"z13"];
    self.sw.text = [NSString stringWithFormat:@"SW: %@", @"0000000"];
    self.comsw.text = [NSString stringWithFormat:@"COM SW: %@", @"1.0.0"];
    self.date.text = [NSString stringWithFormat:@"DATE: %@", @"20170112"];
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
}
@end
